<?php
/*
 * @Author: lokei
 * @Date: 2022-08-09 11:15:50
 * @LastEditors: lokei
 * @LastEditTime: 2022-08-20 08:36:40
 * @Description: 
 */

namespace App\Http\Controllers\Rbac\Auth;

use App\Common\Tools\ResultTool;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;

class AuthController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    //
    public function logout(Request $request)
    {
        $tokenStr = $request->input('token');
        JWTAuth::setToken($tokenStr)->invalidate();
        return ResultTool::success();
    }
}
